import type { MetadataTagDefinition, PropertyDefinition } from '@coderline/alphatab-alphatex/types';

export const generalMidiInstruments = [
    'Acoustic Grand Piano',
    'Bright Grand Piano',
    'Electric Grand Piano',
    'Honky tonk Piano',
    'Electric Piano 1',
    'Electric Piano 2',
    'Harpsichord',
    'Clavinet',
    'Celesta',
    'Glockenspiel',
    'Musicbox',
    'Vibraphone',
    'Marimba',
    'Xylophone',
    'Tubularbells',
    'Dulcimer',
    'Drawbar Organ',
    'Percussive Organ',
    'Rock Organ',
    'Church Organ',
    'Reed Organ',
    'Accordion',
    'Harmonica',
    'Tango Accordion',
    'Acoustic Guitar Nylon',
    'Acoustic Guitar Steel',
    'Electric Guitar Jazz',
    'Electric Guitar Clean',
    'Electric Guitar Muted',
    'Overdriven Guitar',
    'Distortion Guitar',
    'Guitar Harmonics',
    'Acoustic Bass',
    'Electric Bass Finger',
    'Electric Bass Pick',
    'Fretless Bass',
    'Slap Bass 1',
    'Slap Bass 2',
    'Synth Bass 1',
    'Synth Bass 2',
    'Violin',
    'Viola',
    'Cello',
    'Contrabass',
    'Tremolo Strings',
    'Pizzicato Strings',
    'Orchestral Harp',
    'Timpani',
    'String Ensemble 1',
    'String Ensemble 2',
    'Synth Strings 1',
    'Synth Strings 2',
    'Choir Aahs',
    'Voice Oohs',
    'Synth Voice',
    'Orchestra Hit',
    'Trumpet',
    'Trombone',
    'Tuba',
    'Muted Trumpet',
    'French Horn',
    'Brass Section',
    'Synth Brass 1',
    'Synth Brass 2',
    'Soprano Sax',
    'Alto Sax',
    'Tenor Sax',
    'Baritone Sax',
    'Oboe',
    'English Horn',
    'Bassoon',
    'Clarinet',
    'Piccolo',
    'Flute',
    'Recorder',
    'Pan Flute',
    'Blown bottle',
    'Shakuhachi',
    'Whistle',
    'Ocarina',
    'Lead 1 Square',
    'Lead 2 Sawtooth',
    'Lead 3 Calliope',
    'Lead 4 Chiff',
    'Lead 5 Charang',
    'Lead 6 Voice',
    'Lead 7 Fifths',
    'Lead 8 Bass and Lead',
    'Pad 1 newage',
    'Pad 2 warm',
    'Pad 3 polysynth',
    'Pad 4 choir',
    'Pad 5 bowed',
    'Pad 6 metallic',
    'Pad 7 halo',
    'Pad 8 sweep',
    'Fx 1 rain',
    'Fx 2 soundtrack',
    'Fx 3 crystal',
    'Fx 4 atmosphere',
    'Fx 5 brightness',
    'Fx 6 goblins',
    'Fx 7 echoes',
    'Fx 8 scifi',
    'Sitar',
    'Banjo',
    'Shamisen',
    'Koto',
    'Kalimba',
    'Bag pipe',
    'Fiddle',
    'Shanai',
    'Tinkle Bell',
    'Agogo',
    'Steel Drums',
    'Woodblock',
    'Taiko Drum',
    'Melodic Tom',
    'Synth Drum',
    'Reverse Cymbal',
    'Guitar Fret Noise',
    'Breath Noise',
    'Seashore',
    'Bird Tweet',
    'Telephone Ring',
    'Helicopter',
    'Applause',
    'Gunshot'
];

export function properties(...props: PropertyDefinition[]): Map<string, PropertyDefinition> {
    return new Map(props.map(p => [p.property.toLowerCase(), p]));
}

export function metadata(...metadata: MetadataTagDefinition[]) {
    return new Map<string, MetadataTagDefinition>(metadata.map(t => [t.tag.toLowerCase(), t]));
}
